package com.hzw.code.fast.sys.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hzw.code.fast.sys.controller.args.SysUserPageArgs;
import com.hzw.code.fast.sys.dto.SysUserDto;
import com.hzw.code.fast.sys.entity.SysUserEntity;
import com.hzw.code.security.model.CustomUserDetails;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 用户数据层接口
 */
public interface SysUserMapper  extends BaseMapper<SysUserEntity> {

    /**
     * 列表查询
     * @param queryDto
     * @return
     */
    List<SysUserDto> findSysUserList(SysUserPageArgs queryDto);

    /**
     * 登录
     * @param userName   账号
     * @return
     */
    CustomUserDetails getUserByUsername(@Param("userName") String userName);

}
